import fetch from '@system.fetch';

import {EventBus} from './utils/eventBus.js';
export default {
    eventBus:new EventBus(),
    onCreate() {
        console.info('AceApplication onCreate');
    },
    onDestroy() {
        console.info('AceApplication onDestroy');
    },
    data:{
        userid:'1'

    },

    httpRequest(url,success,fail){
        fetch.fetch({
            url: url,
            responseType: 'json',
            headers: {
                'content-type': 'application/json'
            },
            method: 'GET',
            success: res => {
              success(res)
            },
            fail: res => {
                fail(res)
            }
        });
    }
};
